package com.mgr.test;

import java.util.Date;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.mgr.model.Customers;

/**
 * @author Hoang
 * @version $Revision: 1.0 $
 */
@Transactional
public class Problems {

	@Autowired
	private SessionFactory session;

	public void save() {
		Customers customer;
		Date date = new Date("1/2/2013");
		customer = new Customers(1, "HoangDoan", "123456", date, true, "VN",
				"HCM", "1", "22", "hoangdoan@magrabbit.com", "656564", "54353",
				date, "5454", true);
		customer = new Customers(2, "HoangDoan", "123456", date, true, "VN",
				"HCM", "1", "22", "hoangdoan@magrabbit.com", "656564", "54353",
				date, "5454", true);

		session.getCurrentSession().save(customer);
	}

	/**
	 * Method main.
	 * @param args String[]
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Problems t = new Problems();
		t.save();
	}

}
